Skip to content

Conversation

@EESchneider
Copy link

Since v0.11.0, modifying guioptions causes an error in Neovim. In particular, whenever multiple tabs are open, buftabline#update triggers an error message like

Error detected while processing BufAdd Autocommands for "*"..function buftabline#update:
line 2:
E519: Option not supported: guioptions+=e
Press ENTER or type command to continue```

@soyuka
Copy link

soyuka commented Nov 27, 2025

this deserves to be merged :D

@bufdev
Copy link

bufdev commented Dec 5, 2025

Merge it!

@ap
Copy link
Owner

ap commented Dec 8, 2025

Does this patch also fix it?

diff --git i/plugin/buftabline.vim w/plugin/buftabline.vim
--- i/plugin/buftabline.vim
+++ w/plugin/buftabline.vim
@@ -170,8 +170,10 @@ endfunction

 function! buftabline#update(zombie)
        set tabline=
-       if tabpagenr('$') > 1 | set guioptions+=e showtabline=2 | return | endif
-       set guioptions-=e
+       " set! is used here because neovim lacks guioptions and v0.11.0 broke backcompat
+       " by making setting it an error instead of a no-op
+       if tabpagenr('$') > 1 | set! guioptions+=e showtabline=2 | return | endif
+       set! guioptions-=e
        if 0 == g:buftabline_show
                set showtabline=1
                return

@ap
Copy link
Owner

ap commented Dec 9, 2025

FWIW my thinking here is that set’s typo protection is irrelevant once the code is written, but circumventing the typo protection through a conditional both makes ⓐ the code messier to read (I had to read carefully to verify that the code will do the same thing after the patch) and ⓑ adds an ongoing runtime cost (which is tiny, but it’s in a latency-sensitive spot – and the way software gets bloated and slow is “little by little”). So between the options of paying extra to keep an otherwise useless check and just skipping the check, I’d rather prefer the latter – if it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants